<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录功能测试</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-5">
        <div class="row justify-content-center">
            <div class="col-md-6">
                <div class="card">
                    <div class="card-header bg-primary text-white">
                        <h3 class="mb-0">登录功能测试</h3>
                    </div>
                    <div class="card-body">
                        <h5>当前登录状态:</h5>
                        {% if session.user_id %}
                            <div class="alert alert-success">
                                <strong>已登录</strong><br>
                                用户名: {{ session.username }}<br>
                                用户ID: {{ session.user_id }}<br>
                                真实姓名: {{ session.full_name or '未设置' }}
                            </div>
                        {% else %}
                            <div class="alert alert-warning">
                                <strong>未登录</strong>
                            </div>
                        {% endif %}
                        
                        <hr>
                        
                        <h5>快速链接:</h5>
                        <div class="d-grid gap-2">
                            <a href="/login" class="btn btn-primary">登录页面</a>
                            <a href="/register" class="btn btn-success">注册页面</a>
                            <a href="/" class="btn btn-secondary">返回首页</a>
                            {% if session.user_id %}
                                <a href="/logout" class="btn btn-danger">退出登录</a>
                            {% endif %}
                        </div>
                        
                        <hr>
                        
                        <h5>演示账户:</h5>
                        <p><strong>用户名:</strong> demo</p>
                        <p><strong>密码:</strong> demo123</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
